package processing;

import model.Doc;

import com.aliasi.spell.TfIdfDistance;
import com.aliasi.util.Distance;

public class DocDistance implements Distance<Doc> {

  private TfIdfDistance globalDistance;
  
  public DocDistance(TfIdfDistance globalDistance) {
    this.globalDistance = globalDistance;
  }
  
  @Override
  public double distance(Doc d1, Doc d2) {
    return this.globalDistance.distance(d1.getRawText(), d2.getRawText()); 
  }
  
  
  public double proximity(Doc d1, Doc d2) {
    return this.distance(d1, d2);
  }
 
}
